package com.purchase.ml.bean.base;

public class Rets {

    public static final Integer SUCCESS = 200;
    public static final Integer FAILURE = 500;
    public static final Integer TOKEN_EXPIRE = 409;

    public static Ret success(Object data) {
        return new Ret(Rets.SUCCESS, "Berjaya", data);
    }

    public static Ret failure(String msg) {
        return new Ret(Rets.FAILURE, msg, null);
    }

    public static Ret success() {
        return new Ret(Rets.SUCCESS, "Berjaya", null);
    }

    public static Ret expire() {
        return new Ret(Rets.TOKEN_EXPIRE, "token expired", null);
    }
}
